<%@page import="web.lbsproject.processaudit.model.TaskExecutionListItem4Web"%>
<%@page import="web.lbsproject.processaudit.model.TaskExecution4Web"%>
<%@page import="lbsproject.processaudit.model.WorkRegion"%>
<%@page import="lbsproject.processaudit.model.Worker"%>
<%@page import="web.lbsproject.processaudit.model.CheckTaskDefine4Web"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>巡检项目执行记录</title>
<link href="css/global.css" type="text/css" rel="stylesheet"/>
<style type="text/css">
label {
	font-weight: bold;
}
</style>
</head>
<body>
	<jsp:include page="WEB-INF/template/header.jsp">
		<jsp:param value="current" name="executeManage"/>
	</jsp:include>
	<div id="container" class="section">
		<div class="main">
			<%
			TaskExecution4Web task = (TaskExecution4Web)request.getAttribute("record");
			if (task != null) {
			%>
			<strong><%=task.getExePerson() %></strong>
			<br/>
			<label>任务名</label>：<%=task.getTaskName() %> &nbsp; 
			<label>执行时间</label>：<%=task.getTime() %> &nbsp; 
			<label>执行地点</label>：<%=task.getCheckPointName() %>
			<br/>
			<label>任务状态</label>：<%=task.getTaskStatus() %> &nbsp; 
			<label>执行结果</label>：<%=task.getExeResult() %> &nbsp; 
			<label>设备状况</label>：<%=task.getDeviceState() %>
			
			<h1 align="center">&nbsp;任务执行详情&nbsp; </h1>
			
			<div >
				<table class="table">
					<thead>
						<tr>
							<th width="25%">检查项</th>
							<th width="25%">状态</th>
							<th width="40%">描述</th>
							<th width="10%">照片</th>
						</tr>
					</thead>
					<tbody>
					<%
					@SuppressWarnings("unchecked")
					List<TaskExecutionListItem4Web> items = (List<TaskExecutionListItem4Web>)request.getAttribute("recordItems");
					if (items != null) {
						for (TaskExecutionListItem4Web item: items) {
					%>
						<tr>
							<td><%=item.getName() %></td>
							<td><%=item.getState() %></td>
							<td><%=item.getDescription() %></td>
							<%
							if (item.getPhotoUrl() != null) {
							%>
							<td><a href="<%=item.getPhotoUrl() %>"><img src="<%=item.getPhotoUrl() %>" width="20" height="20"></a></td>
							<%
							} else {
							%>
							<td>（无）</td>
							<%
							}
							%>
						</tr>
					<%
						}
					}
					%>
					</tbody>
				</table>
			</div>
			<%
			}
			%>
		</div>
		<div class="aside">
			<ul class="side-nav">
				<li class="nav-item high-light"><a id="side-nav-1" class="nav-base" href=""><b>执行记录</b><em></em></a></li>
				<li class="nav-item "><a id="side-nav-1" class="nav-base" href="ShowTaskExecution?forwardPage=executionAccomplish"><b>完成情况</b><em></em></a></li>
			</ul> 
		</div>
		<div class="clear"></div>
	</div>
	<jsp:include page="WEB-INF/template/footer.jsp"></jsp:include>
</body>
</html>